package com.design.enums;

import lombok.Getter;

import java.util.ArrayList;
import java.util.List;

/**
 * @author jack
 * @version 1.0
 * @Package com.design.enums
 * @Description: 支付方式枚举类型
 * @date 2021/6/6  17:34
 */
@Getter
public enum PayModeEnum {
    WEIXIN_PAY("weixin","微信支付"),
    ALIPAY_PAY("alipay","支付宝支付"),
    CARD_PAY("card","银行卡支付"),;

    private String code;
    private String desc;

    PayModeEnum(String code, String desc) {
        this.code = code;
        this.desc = desc;
    }

    /**
     * 获取枚举值常量列表
     * @param
     * @return
     */
    public static List<PayModeEnum> getEumValueList() {
        List<PayModeEnum> list=new ArrayList<PayModeEnum>();
        for(PayModeEnum payModeEnum:PayModeEnum.values()) {
            list.add(payModeEnum);
        }
        return list;
    }

}
